CustomiOSApi 1.09
CustomiOSApi Class Reference

Factory class to get the printer driver class for supported model id More...

#import <CustomiOSApi.h>

Instance Methods

(NSString *) - GetAPIVersion
 Returns current API version More...
 
(void) - EnableLogAPI:
 
(NSArray *) - EnumWifiDevices:searchTime:
 Get the list of the available CUSTOM wifi/ethernet devices More...
 
(CustomPrinter *) - GetPrinterDriverWIFI:printerIpAddr:
 Connects to WiFi/Ethernet Printer device More...
 
(CustomPrinter *) - GetPrinterDriverWIFI:printerIpAddr:printerIpPort:
 Connects to WiFi/Ethernet Printer device More...
 
(NSArray *) - EnumBTDevices:
 Get the list of the available bluetooth devices More...
 
(CustomPrinter *) - GetPrinterDriverBT:btdevice:
 Connects to Bluetooth Printer device More...
 
(NSArray *) - EnumBLEDevices:searchTime:
 Get the list of the available BLE (bluetooth low energy) devices More...
 
(CustomPrinter *) - GetPrinterDriverBLE:bledevice:
 Connects to BLE (bluetooth low energy) Printer device More...
 

Detailed Description

Factory class to get the printer driver class for supported model id

Method Documentation

◆ EnableLogAPI:

- (void) EnableLogAPI: (Boolean)  enable

Enable / disable the API log (default disabled)

Parameters
enableLog status

◆ EnumBLEDevices:searchTime:

- (NSArray *) EnumBLEDevices: (NSInteger) 
searchTime: (NSError **)  error 

Get the list of the available BLE (bluetooth low energy) devices

Parameters
searchTimeSearch BLE devices timeout (msec)
errorError pointer
Returns
The array of CBPeripheral of BLE devices

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum BLE devices (search devices)
NSArray* arrayBLE = [customApi EnumBLEDevices:3000 :&error];
//Save the 1st BLE Device found
CBPeripheral* ble1stDevice = [arrayBLE objectAtIndex:0];
Factory class to get the printer driver class for supported model id
Definition: CustomiOSApi.h:21

◆ EnumBTDevices:

- (NSArray *) EnumBTDevices: (NSError **)  error

Get the list of the available bluetooth devices

Parameters
errorError pointer
Returns
The array of EAAccessory of bluetooth devices

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum BT devices (search devices)
NSArray* arrayBT = [customApi EnumBTDevices:&error];
//Save the 1st BT Device found
EAAccessory* bt1stDevice = [arrayBT objectAtIndex:0];

◆ EnumWifiDevices:searchTime:

- (NSArray *) EnumWifiDevices: (NSInteger) 
searchTime: (NSError **)  error 

Get the list of the available CUSTOM wifi/ethernet devices

Parameters
searchTimeSearch wifi/ethernet devices timeout (msec)
errorError pointer
Returns
The array of NSString with IP ADDRESS of CUSTOM wifi/Ethernet devices

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum WIFI devices (search devices for 1.5 secs)
NSArray* arrayIP = [customApi EnumWifiDevices:1500 :&error];
//Save the 1st IP found
NSString* str1stDeviceIP = [arrayIP objectAtIndex:0];

◆ GetAPIVersion

- (NSString *) GetAPIVersion

Returns current API version

Returns
current API version

◆ GetPrinterDriverBLE:bledevice:

- (CustomPrinter *) GetPrinterDriverBLE: (CBPeripheral *) 
bledevice: (NSError **)  error 

Connects to BLE (bluetooth low energy) Printer device

Parameters
bledeviceCBPeripheral* of the device
errorError pointer
Returns
Printer driver class according to its model/printer ID

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum BLE devices (search devices)
NSArray* arrayBLE = [customApi EnumBLEDevices:3000 :&error];
//Open the 1st device found
CustomPrinter* cp = [customApi GetPrinterDriverBLE:[arrayBLE objectAtIndex:0] :&error];
Class definition for CUSTOM printers. Defines functionality to print text/image, read/write data to p...
Definition: CustomPrinter.h:21

◆ GetPrinterDriverBT:btdevice:

- (CustomPrinter *) GetPrinterDriverBT: (EAAccessory *) 
btdevice: (NSError **)  error 

Connects to Bluetooth Printer device

Parameters
btdeviceEAAccessory* of the device
errorError pointer
Returns
Printer driver class according to its model/printer ID

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum BT devices (search devices)
NSArray* arrayBT = [customApi EnumBTDevices:&error];
//Open the 1st device found
CustomPrinter* cp = [customApi GetPrinterDriverBT:[arrayBT objectAtIndex:0] :&error];

◆ GetPrinterDriverWIFI:printerIpAddr:

- (CustomPrinter *) GetPrinterDriverWIFI: (NSString *) 
printerIpAddr: (NSError **)  error 

Connects to WiFi/Ethernet Printer device

Parameters
printerIpAddrPrinter IP Address
errorError pointer
Returns
Printer driver class according to its model/printer ID

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum WIFI devices (search devices for 1.5 secs)
NSArray* arrayIP = [customApi EnumWifiDevices:1500 :&error];
//Open the 1st device found (on default 9100 port)
CustomPrinter* cp = [customApi GetPrinterDriverWIFI:[arrayIP objectAtIndex:0] :&error];

◆ GetPrinterDriverWIFI:printerIpAddr:printerIpPort:

- (CustomPrinter *) GetPrinterDriverWIFI: (NSString *) 
printerIpAddr: (NSInteger) 
printerIpPort: (NSError **)  error 

Connects to WiFi/Ethernet Printer device

Parameters
printerIpAddrPrinter IP Address
printerIpPortPrinter IP Port
errorError pointer
Returns
Printer driver class according to its model/printer ID

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum WIFI devices (search devices for 1.5 secs)
NSArray* arrayIP = [customApi EnumWifiDevices:1500 :&error];
//Open the 1st device found (on 9100 port)
CustomPrinter* cp = [customApi GetPrinterDriverWIFI:[arrayIP objectAtIndex:0] :9100 :&error];